<template>
  <div id="app">
    <router-view></router-view>
  </div>
</template>

<script>

export default {
  name: 'app',
  watch: {
    $route(to, from) {
      if(to.path !== '/login') {
        let tabNew = {
          name: to.name,
          title: to.meta.title
        }
        this.$store.commit('addTab', tabNew)
      }
    },
  },
  mounted() {
    if(this.$route.path !== '/login') {
      let tabNew = {
        name: this.$route.name,
        title: this.$route.meta.title
      }
      this.$store.commit('addTab', tabNew)
    }
  }
}
</script>

<style>
  #app {
    width: 100%;
    height: 100%;
  }

  .text-white {
    color: white;
  }

  .el-dropdown-menu__item:focus, .el-dropdown-menu__item:not(.is-disabled):hover{
    background-color: rgba(255, 0, 0, 0.1) !important;
    color: #E64B1A !important;
  }

  .el-tabs__item:hover, .el-tabs__item.is-active {
    color: #E64B1A !important;
  }

  .el-input__inner:focus {
    border-color: #E64B1A !important;
  }

  a, a:link, a:visited, a:hover, a:active {
    text-decoration: none;
  }
</style>
